package com.xcc;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class StartListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("------------------xccIm_open------------------");
        MinaServer.start();
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        MinaServer.stop();
        System.out.println("------------------xccIm_close------------------");
    }
}
